package com.frame.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.frame.domain.User.Columns;
import com.mini.core.WeakEntity;
import com.mini.core.annotation.Column;
import com.mini.core.annotation.Entity;
import com.mini.core.utils.EnumClazz.StrategyType;

/**
 * @author sxjun
 * @version 2016-3-17
 */
@Entity(table="Role",id="ID",strategy=StrategyType.UUID)
public class Role extends WeakEntity implements Serializable {
	private static final long serialVersionUID = 1L;
    
    /**
	 * Columns
	 */
	public static final class Columns {
		public static final String id = "ID";
		public static final String rolename = "ROLENAME";
		public static final String description = "DESCRIPTION";
		public static final String createtime = "CREATETIME";
		public static final String rolekey = "ROLEKEY";
	}
	
	/**
	 * Primary key
	 * @return
	 */
	@Column("id")
    public String getId() {
    	return super.getStr(Columns.id);
	}

    /**
	 * Primary key
	 * @param id
	 * @return
	 */
	public Role setId(String id) {
		super.set(Columns.id, id);
		return this;
	}

	/**
	 * Get the createtime
	 * @return
	 */
	@Column("createtime")
	public Date getCreatetime() {
		return super.getDate(Columns.createtime);
	}
	
	/**
	 * set the createtime
	 * @param createtime
	 * @return
	 */
	public Role setCreatetime(Date createtime) {
		super.set(Columns.createtime, createtime);
		return this;
	}
	
	/**
	 * Get role name
	 * @return
	 */
	@Column("rolename")
	public String getRolename() {
		return super.getStr(Columns.rolename);
	}

	/**
	 * Set role name
	 * @param rolename
	 * @return
	 */
	public Role setRolename(String rolename) {
		super.set(Columns.rolename, rolename);
		return this;
	}

	/**
	 * Get the description of the role
	 * @return
	 */
	@Column("description")
	public String getDescription() {
		return super.getStr(Columns.description);
	}

	/**
	 * Set the description of the role
	 * @param description
	 * @return
	 */
	public Role setDescription(String description) {
		super.set(Columns.description, description);
		return this;
	}
	
	/**
	 * Get the key id of role
	 * @return
	 */
	@Column("permid")
	public String getRolekey() {
		return super.getStr(Columns.rolekey);
	}

	/**
	 * Set the key id of role
	 * @param rolekey
	 */
	public Role setRolekey(String rolekey) {
		super.set(Columns.rolekey,rolekey);
		return this;
	}
}
